home *** CD-ROM | disk | FTP | other *** search
-
- TBUG.SYS - the device driver debugger
- Copyright (c) 1986 by Communica
- All rights reserved
-
-
- TBUG.SYS is an MS-DOS installable device driver that addresses
- the old chicken-and-egg problem of how to debug a new device
- driver before DOS is available to load the debugger. It can
- be activated by hard coding an Interrupt 3 (0CCh) into your
- program at the point you wish the debugger to gain control.
-
-
- USAGE AND OPTIONS:
-
- Add the following line to your CONFIG.SYS file immediately
- before the driver you wish to debug.
-
- device = tbug.sys [2] [5] [s]
-
- Where:
- 2 enables NMI interception
- 5 enables entry via PrtScr key (INT5)
- S forces TBUG to use a local stack instead of the user's stack
-
- NOTE - parameters must be delimited by one or more white spaces.
-
-
- OPERATION:
-
- After installation and initialisation, TBUG will display the
- paragraph address that the next device driver will be loaded
- at so all you need to debug your driver is a copy of the link
- map and an understanding of IBM's DEBUG.COM (whose syntax
- TBUG mimics).
-
-
- DIFFERENCES FROM IBM'S DEBUG.COM:
-
- TBUG assumes no file system is present so Name, Read, and Write
- commands will not be implemented. If you need these abilities,
- let me recommend PfixPlus from Phoenix. If there is enough
- interest, I will implement Sector Read and Sector Write.
-
- Entry via Int 5 will return you to whence you came upon doing
- a 'G' or a 'Q'. This means that if you do a PrtScr at the
- command prompt, a 'Q' will not appear to return you to the
- prompt - the cursor will end up sitting at the start of the
- next line. Type DIR and you'll notice exactly where you are!
-
- The new 'Z' command causes a warm boot by setting the warmboot
- flag in low memory (to prevent memory test) and jumping to
- the cold boot code at F000:FFF0.
-
- Dump has been enhanced - DW, DD, and DA dump as words, dwords,
- and addresses.
-
- Flags can be modified by using 'R F' or 'R FL'.
-
- TBUG does not wake up with a file size in CX as no file system
- is assumed.
-
- The new B command has been added to do breakpoint maintenance.
- There are two types of breakpoints in TBUG - sticky and temp.
- A temp will interrupt your program and return control to TBUG,
- at this time, ALL temp breakpoints are removed. Sticky break-
- points will also interrupt the program but TBUG will reenable
- them immediately. 'B' alone will display all current sticky bps.
- 'Bn' will display current location of sticky bp n and
- interactively modify it. 'BRn' will remove sticky breakpoint n.
- 'BT' sets a temp (can also be set by 'G seg:ofs'). 'BRT seg:ofs'
- will remove temp at seg:ofs while 'BRT' will remove all temps.
-
- Four addresses - 0:0, 0:1, 0:2, and 0:3 - are reserved for
- use as flags in the internal breakpoint tables. It is not
- meaningful to set a breakpoint in the reserved interrupt vector
- that is normally found at these addresses. Breakpoint addresses
- are NOT range checked for these values so you risk invalidating
- the breakpoint identification logic if you attempt to set a
- breakpoint at these addresses!
-
- Also, segment values of 0FFFFh are used internally by the break-
- point setting logic - if for some reason your system does not
- have ROM at the top of the address space, and you need to set
- a breakpoint in segment F000, avoid using FFFF as a seg address.
-
- 'Q' has the same effect as G=cs:ip except that it re-inits
- internal variables before doing it. This is because I can't
- assume a file system to do an exit to. If this behavior is
- not desired, reboot the system with 'Z'.
-
-
- CAVEATS:
-
- You must exit via Quit in order to restore ctrl-brk vectors!
- If you use Ctrl-Break to restart the debugger after exiting
- via Go, the system will be in an unstable state and a crash
- is to be expected. Ctrl-Break interception is only included
- as a method to abort long memory Dumps - not as a hot key.
- If you desire a hot key, use the '5' switch on the command
- line to activate PrtScr as a TBUG entry.
-
- Although stack swapping can be activated by using the 'S' switch,
- this is a questionable practice and is only intended for use
- while debugging TBUG. Do NOT use this option for normal use!
-
-
- DISCLAIMER:
-
- This software is under development - you use it at your own
- risk. I feel that it can be valuable to any programmer that
- is writing DOS Installable Device Drivers even in its current
- incomplete state. As with all such tools, this program has
- the ability to alter memory while the system is operating and
- cause subsequent failures. Under no circumstances can the author
- or Communica be held liable for any problems that arise from
- such use.
-
-
- LICENSE:
-
- This is a copyrighted program and is not being released into
- the Public Domain, nor is it freeware. I wrote this because
- I needed a tool that did not exist (unless you consider the
- $45,000 Intel I2ICE machine) in order to do my job. TBUG
- will be significantly enhanced and distibuted as a commercial
- program. Plans are to do a bootable ROM implementation with
- write protected RAM so TBUG will work with all PC operating
- systems, not just MS-DOS.
-
- You may use this program in any way that you please and
- distribute it freely as long as it remains un-modified
- and this documentation file is included.
-
- Bug reports and comments are welcome and should be directed to:
-
- Communica
- Attn: Matt Trask
- 3 Winslow St.
- Bourne, MA 02532
-
-
- RELEASE NOTES:
-
- Ver 0.1 02/18/86
-
- Not all DEBUG command are implemented at this time - you
- will receive a message to this effect if you try to use
- an unimplemented command. In particular, Breakpoint is
- documented but not yet activated. Breakpoints may be set
- but will not be automatically cleared and the old contents
- of the byte where the breakpoint was set will NOT be restored.
-
- Currently supported commands are Dump, Enter, Registers, Go
- (no G= yet), Trace (also Tn but not T= yet), Quit, 5 (Print
- Screen), and Z (Warmboot).
-
- Stack swapping needs to be enabled with DOS 2.x (not with
- 3.x) because the stack provoded by DOS is inadequate.
-
-
-
-
-